<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Image Croping Tool</title><link rel="stylesheet" type="text/css" href="/css/coreBlue.css">
<link rel="stylesheet" type="text/css" href="/css/defaultThemeNew.css?OpenPage">
<link rel="stylesheet" type="text/css" href="/global/collaboration/SavvySol.nsf/Skins/7TJNJB?OpenDocument&Expand=CSS">
<link rel="stylesheet" type="text/css" href="/css/iehacks1.css">
<link rel="stylesheet" type="text/css" href="/css/blog.css">




<script language="JavaScript" type="text/javascript">
<!-- 

var sURL = unescape(window.location.pathname);
function refresh()
{
    document.getElementById('information').style.visibility = 'hidden'; 
}


function getURLParam(strParamName) {
    //Get a URL Parameter from the current location.href
    var strReturn = "";
    var strHref = window.location.href;
    if ( strHref.indexOf("?") > -1 ){
        //var strQueryString = "&" + strHref.substr(strHref.indexOf("?") + 1).toLowerCase();
        var strQueryString = "&" + strHref.substr(strHref.indexOf("?") + 1)
        var aQueryString = strQueryString.split("&");
        for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
            if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
                var aParam = aQueryString[iParam].split("=");
                strReturn = aParam[1];
                break;
            }
        }
    }
    return strReturn;
}




function loadFirstPage() {
    try {
        // initialize variables
        if (getURLParam("returnfield"))
        	{
        	    croptype= getURLParam("open");
            	returnFieldName = getURLParam("returnfield");
            	Bkey= getURLParam("Bkey");
        	}
    }
    catch (e) {
       // document.getElementById("photoimg").innerHTML = errormessage + e. message + " (" + e.name + ")";
    }
}


function SubmitPhoto()
{
var btn = document.getElementById( "btnSubmitPhoto");
//document.getElementById('information').style.visibility = 'hidden';           
btn.click();
}



function UploadPhoto()

{
var btn = document.getElementById( "btnUpload");
alert("Uploading please wait !!")          
btn.click();
}
// -->
</script>



<script language="JavaScript" type="text/javascript">
<!-- 
document._domino_target = "_self";
function _doClick(v, o, t, h) {
  var form = document._frmImageCrop;
  if (form.onsubmit) {
     var retVal = form.onsubmit();
     if (typeof retVal == "boolean" && retVal == false)
       return false;
  }
  var target = document._domino_target;
  if (o.href != null) {
    if (o.target != null)
       target = o.target;
  } else {
    if (t != null)
      target = t;
  }
  form.target = target;
  form.__Click.value = v;
  if (h != null)
    form.action += h;
  form.submit();
  return false;
}
// -->
</script>
</head>




<%@ page import="com.google.appengine.api.blobstore.BlobstoreServiceFactory" %>
<%@ page import="com.google.appengine.api.blobstore.BlobstoreService" %>
<%
   BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
%>



<body text="#000000" bgcolor="#FFFFFF"  onload="loadFirstPage();" >

<form method="post"  action="<%= blobstoreService.createUploadUrl("/uploadtemp")%>" enctype="multipart/form-data" name="_frmImageCrop">
<input type="hidden" name="__Click" value="0"><div style="display:none">



        <script language="javascript">
            /*
             Configuration parameters which can be overridden
             */
            var croptype =null;
            var Bkey =null;
            var returnFieldName = null; //The fieldname which the selected value will be returned to (must be a plain text or textarea field)
        </script>
        
</div>
<br><br>

<div id="information" align="center">


<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="461">To upload an image to your profile, follow the steps below. This window will automatically close once the image is uploaded. Note: uploading an image to your profile is instant and permanent.<br>
1.) Specify the image to upload by clicking the Browse button below and click "Load Image". This image will appear in the green work area to the left below Use your mouse to move and resize the selection tool on your image in the work area.<br>
2.) The selection tool can be re-sized by dragging the lower right corner; this has the effect of zooming in and out on your image. <br>
3.) Click the Upload image button below. This could take a few minutes depending on your network connection.<br></td><td width="229" colspan="2"><div align="center">
<input type="file" name="txtFileName"> <br><div align="center"><br><span class="lotusBtn lotusBtnAction lotuscenter"><a  target="" href="javascript:SubmitPhoto()" ><b>Load Image</b></a>
</span></div></div><font size="2" color="#FF0000" face="Verdana">               </font></td></tr>
</table>



<div id="dd"  style="display:none" >
<input type="button" value="UploadFile" id="btnSubmitPhoto" onclick="return _doClick('txtFileName', this, null)"></div>
<div id="dd"  style="display:none" ></div>
<div id="dd"  style="display:none" >
</div>

</div>
<input name="Query_String_Decoded" type="hidden" value="openform&amp;parentdocid=91BE5452D746A17985257A5B0017CE43">

</form>
</body>
</html>
	